PIN_OPEN = 0;
PIN_GO = 2;
PIN_IS_OPEN = 1;--外置电平
PIN_LED1_TONER = 5;
PIN_LED2_DRUM = 6;
PIN_LED3_PAPER = 7;
PIN_LED4_READY = "A0";-- ADC输入
gpio.mode(PIN_IS_OPEN,gpio.INT);

gpio.write(PIN_LED1_TONER,gpio.LOW);
gpio.write(PIN_LED2_DRUM,gpio.LOW);
gpio.write(PIN_LED3_PAPER,gpio.LOW);

gpio.mode(PIN_LED1_TONER,gpio.INPUT);
gpio.mode(PIN_LED2_DRUM,gpio.INPUT);
gpio.mode(PIN_LED3_PAPER,gpio.INPUT);

gpio.mode(PIN_OPEN,gpio.OUTPUT);
gpio.mode(PIN_GO,gpio.OUTPUT);
gpio.write(PIN_OPEN,gpio.HIGH);
gpio.write(PIN_GO,gpio.HIGH);
--初始化ADC
adc.force_init_mode(adc.INIT_ADC);

dofile("sock.lua")
